<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <style>
    .class1 {
      color: blue;
    }
    .class2 {
      color: pink;
    }
    .font {
      font-size: 19px;
    }
  </style>
</head>
<body>
<div id="app">
  <h2 class="font" :class="getClasses()">{{message}}</h2>
  <button @click="btnClick()">button</button>
</div>
<script src="../js/vue.js"></script>
<script>
  const app = new Vue({
    el: '#app',
    data: {
      message: 'hello',
      isClass1: true,
      isClass2: true,
      active: 'aaaaa',
      line: 'bbbbb'
    },
    methods: {
      btnClick() {
        this.isClass2 = !this.isClass2;
      },
      getClasses() {
        return [this.active, this.line]
          // class1: this.isClass1, class2: this.isClass2
      }
    }
  })
</script>
</body>
</html>